import Layout from '@/views/Layout.vue'
import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  locale: 'zh-CN',
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView,
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue'),
    // },
        {
      path: '/',
      name: 'layout',
      component: Layout,
      children:[
        {
          path: '/employee',
          name: 'employee',
          component: () => import('../views/employee/Employee.vue'),
        },
        {
          path: '/cartgory',
          name: 'cartgory',
          component: () => import('../views/food/Categroy.vue'),
        }

      ]
    }

  ],
})

export default router
